package com.spddr.pmos.jpa;

import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.joda.time.Period;

import cn.seqdata.jpa.JpaType;

@Entity
@Table(name = "risk_type")
public class RiskType extends JpaType {
	private static final long serialVersionUID = 1L;

	private Period period;
	private Integer min;
	private Integer max;
	private Integer normal;
	private String evalFunc;

	public RiskType() {
		super();
	}

	public RiskType(Integer id) {
		super(id);
	}

	public RiskType(Integer id, String name) {
		super(id, name);
	}

	@Column(name = "period")
	@Convert(converter = cn.seqdata.jpa.converter.PeriodConverter.class)
	public Period getPeriod() {
		return this.period;
	}

	public void setPeriod(Period period) {
		this.period = period;
	}

	@Column(name = "min")
	public Integer getMin() {
		return this.min;
	}

	public void setMin(Integer min) {
		this.min = min;
	}

	@Column(name = "max")
	public Integer getMax() {
		return this.max;
	}

	public void setMax(Integer max) {
		this.max = max;
	}

	@Column(name = "normal")
	public Integer getNormal() {
		return this.normal;
	}

	public void setNormal(Integer normal) {
		this.normal = normal;
	}

	@Column(name = "eval_func")
	public String getEvalFunc() {
		return this.evalFunc;
	}

	public void setEvalFunc(String evalFunc) {
		this.evalFunc = evalFunc;
	}
}